<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Search Engine: DocumentManager Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Search Engine
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_document_manager-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">DocumentManager Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_document_manager_8h_source.html">DocumentManager.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abc4060e30e0c3081b66969c1cd10a9ce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_document_manager.html#abc4060e30e0c3081b66969c1cd10a9ce">readStopWordList</a> (string filename)</td></tr>
<tr class="separator:abc4060e30e0c3081b66969c1cd10a9ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accb0b3f55df86ae3209f022df247f689"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_document_manager.html#accb0b3f55df86ae3209f022df247f689">addDocumentsFromFile</a> (string fileName)</td></tr>
<tr class="separator:accb0b3f55df86ae3209f022df247f689"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bf4cec15007beaa5b7f5dff7c0e2a50"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_document_manager.html#a0bf4cec15007beaa5b7f5dff7c0e2a50">addDocument</a> (int id, <a class="el" href="class_document.html">Document</a> document)</td></tr>
<tr class="separator:a0bf4cec15007beaa5b7f5dff7c0e2a50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac0834a0e60fa820f8f2e8c2304d3aca"><td class="memItemLeft" align="right" valign="top">map&lt; int, <a class="el" href="class_document.html">Document</a> &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_document_manager.html#aac0834a0e60fa820f8f2e8c2304d3aca">getDocuments</a> ()</td></tr>
<tr class="separator:aac0834a0e60fa820f8f2e8c2304d3aca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab29279b6f28fd36154b624f1a701e563"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_index_handler.html">IndexHandler</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_document_manager.html#ab29279b6f28fd36154b624f1a701e563">getTerms</a> ()</td></tr>
<tr class="separator:ab29279b6f28fd36154b624f1a701e563"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4449cd93625e18aa2a84d245485fb17e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_document.html">Document</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_document_manager.html#a4449cd93625e18aa2a84d245485fb17e">getDocument</a> (int docID)</td></tr>
<tr class="separator:a4449cd93625e18aa2a84d245485fb17e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4a227278a2bfd5ff1070f8f6ce3fd24"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_document_manager.html#af4a227278a2bfd5ff1070f8f6ce3fd24">documentExists</a> (int docID)</td></tr>
<tr class="separator:af4a227278a2bfd5ff1070f8f6ce3fd24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a999689cab3d64144214edc5ab979b01a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_document_manager.html#a999689cab3d64144214edc5ab979b01a">DocumentManager</a> (char type)</td></tr>
<tr class="separator:a999689cab3d64144214edc5ab979b01a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a999689cab3d64144214edc5ab979b01a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DocumentManager::DocumentManager </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor for document manager </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>type of structure to use a=avl tree, h=hash table </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0bf4cec15007beaa5b7f5dff7c0e2a50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DocumentManager::addDocument </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_document.html">Document</a>&#160;</td>
          <td class="paramname"><em>document</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a document to the document map, DOES NOT parse the document in any way </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>the ID of the document </td></tr>
    <tr><td class="paramname">document</td><td>the <a class="el" href="class_document.html">Document</a> object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="accb0b3f55df86ae3209f022df247f689"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DocumentManager::addDocumentsFromFile </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>fileName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add all documents from a given file to the structure </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>the filename of the file to parse all documents from </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af4a227278a2bfd5ff1070f8f6ce3fd24"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool DocumentManager::documentExists </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>docID</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check if a document exists in the map </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">docID</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the document exists, false otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a4449cd93625e18aa2a84d245485fb17e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_document.html">Document</a> DocumentManager::getDocument </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>docID</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return a document matching the given ID </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">docID</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the document object matching docID </dd></dl>

</div>
</div>
<a class="anchor" id="aac0834a0e60fa820f8f2e8c2304d3aca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">map&lt; int, <a class="el" href="class_document.html">Document</a> &gt; * DocumentManager::getDocuments </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the entire documents map </p>
<dl class="section return"><dt>Returns</dt><dd>a ptr to the map of documents </dd></dl>

</div>
</div>
<a class="anchor" id="ab29279b6f28fd36154b624f1a701e563"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_index_handler.html">IndexHandler</a> * DocumentManager::getTerms </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Pointer to the index handler </p>
<dl class="section return"><dt>Returns</dt><dd>a ptr to the <a class="el" href="class_index_handler.html">IndexHandler</a> object </dd></dl>

</div>
</div>
<a class="anchor" id="abc4060e30e0c3081b66969c1cd10a9ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DocumentManager::readStopWordList </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>filename</em> = <code>&quot;StopWordsList.txt&quot;</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read the stopword list into the stopwords vector </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>the filename of the file to read stopwords from </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>C:/Users/Christopher/Documents/NetBeansProjects/pbsearch/SearchEngine/<a class="el" href="_document_manager_8h_source.html">DocumentManager.h</a></li>
<li>C:/Users/Christopher/Documents/NetBeansProjects/pbsearch/SearchEngine/<a class="el" href="_document_manager_8cpp.html">DocumentManager.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 3 2012 01:21:31 for Search Engine by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2
</small></address>
</body>
</html>
